package com.corona.game;

import com.badlogic.gdx.math.Vector2;
import com.corona.Game;

import java.util.ArrayList;

/* compiled from: Battle.java */
/* access modifiers changed from: package-private */
/* loaded from: pokewilds.jar:com/pkmngen/game/BattleAnimPositionPlayers.class */
public class BattleAnimPositionPlayers extends Action {
    Vector2 move;
    public Action.Layer layer = Action.Layer.gui_140;
    ArrayList<Vector2> moves_relative = new ArrayList<>();

    public BattleAnimPositionPlayers(Game game, Action nextAction) {
        super(new Object[0]);
        this.nextAction = nextAction;
        for (int i = 0; i < 72; i++) {
            this.moves_relative.add(new Vector2(2.0f, 0.0f));
        }
        game.player.battleSprite.setPosition(160.0f, 49.0f);
        game.battle.oppPokemon.sprite.setPosition(-48.0f, 88.0f);
        if (game.battle.oppPokemon.sprite.getWidth() <= 48.0f) {
            game.battle.oppPokemon.sprite.setPosition(-42.0f, 88.0f);
        } else if (game.battle.oppPokemon.sprite.getWidth() <= 40.0f) {
            game.battle.oppPokemon.sprite.setPosition(-36.0f, 88.0f);
        }
    }

    @Override // com.corona.game.Action
    public String getCamera() {
        return "gui";
    }

    @Override // com.corona.game.Action
    public Action.Layer getLayer() {
        return this.layer;
    }

    @Override // com.corona.game.Action
    public void step(Game game) {
        if (this.moves_relative.isEmpty()) {
            game.insertAction(this.nextAction);
            game.actionStack.remove(this);
            return;
        }
        this.move = this.moves_relative.get(0);
        game.player.battleSprite.setX(game.player.battleSprite.getX() - this.move.x);
        game.battle.oppPokemon.sprite.setX(game.battle.oppPokemon.sprite.getX() + this.move.x);
        this.moves_relative.remove(0);
    }
}
